package com.bw.z.mvp.view.live;

import android.graphics.Color;
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.blankj.utilcode.util.BarUtils;
import com.bw.z.R;
import com.bw.z.utils.LogUtils;
import com.shuyu.gsyvideoplayer.video.GSYADVideoPlayer;

public class FullVideoActivity extends AppCompatActivity {

    private GSYADVideoPlayer fullGsyPlayer;
    private String url;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_full_video);
        BarUtils.setStatusBarColor(this, Color.WHITE);
        fullGsyPlayer = findViewById(R.id.full_gsy_player);
        url = getIntent().getExtras().getString("live_url");
        LogUtils.show("url:" + url);
        fullGsyPlayer.setUp(url, true, "");
        fullGsyPlayer.getCurrentPlayer().setAutoFullWithSize(true);
        fullGsyPlayer.getCurrentPlayer().startWindowFullscreen(this, false, true);
//        fullGsyPlayer.getBackButton().setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
////                full_gsy_player.getGSYVideoManager().stop();
//                finish();
//            }
//        });
        fullGsyPlayer.startPlayLogic();
    }
}